#ifndef STOCKSETTING_H
#define STOCKSETTING_H

#include <QWidget>
#include <QListWidget>
#include <QStackedWidget>
#include <QGroupBox>
#include <QPushButton>
#include <QSpinBox>

#include "globaldefine.h"

class StockSetting : public QWidget
{
    Q_OBJECT

public:
    StockSetting(QWidget *parent = 0);
    void initMicroDisplaySetting(int flag, QFont font, QColor color, QPoint point);


private:
    void indexWidget();
    void displayWidget();
    void initWindow();

    QWidget* createTabOneInFPW();
    QWidget* createTabTwoInFPW();

    QTabWidget* createMDWidget();
    QTabWidget* createSecondPageWidget();
    QTabWidget* createThirdPageWidget();

signals:
    void signalMicroDisplay(int flag, QFont font, QColor color, QPoint point);
    void signalChangedMDColor(QColor);
    void signalChangedMDFont(QFont);
    void signalChangedMDPosition(QPoint);
    void signalMicroDisplayClose();

public slots:
    void slotRowChanged(int);
    void slotMicroDisplay(int id);
    void slotChangeFont();
    void slotChangeColor();
    void slotChangeXPosition(int x);
    void slotChangeYPosition(int y);

private:
    QListWidget *m_pListWidget;
    QStackedWidget *m_pStackedWidget;

    QButtonGroup *m_pBTGroup;

    QGroupBox *m_pDisplayGB;
    QGroupBox *m_pPosGB;

    QPushButton *m_pFontBT;
    QPushButton *m_pColorBT;

    QSpinBox *m_pSpinBoxX;
    QSpinBox *m_pSpinBoxY;
};

#endif // STOCKSETTING_H
